3.1.80 \(\int \frac {(e x)^{-1+2 n}}{a+b \text {sech}(c+d x^n)} \, dx\) [80]

Optimal. Leaf size=307 \[ \frac {(e x)^{2 n}}{2 a e n}-\frac {b x^{-n} (e x)^{2 n} \log \left (1+\frac {a e^{c+d x^n}}{b-\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} d e n}+\frac {b x^{-n} (e x)^{2 n} \log \left (1+\frac {a e^{c+d x^n}}{b+\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} d e n}-\frac {b x^{-2 n} (e x)^{2 n} \text {PolyLog}\left (2,-\frac {a e^{c+d x^n}}{b-\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} d^2 e n}+\frac {b x^{-2 n} (e x)^{2 n} \text {PolyLog}\left (2,-\frac {a e^{c+d x^n}}{b+\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} d^2 e n} \]

[Out]

1/2*(e*x)^(2*n)/a/e/n-b*(e*x)^(2*n)*ln(1+a*exp(c+d*x^n)/(b-(-a^2+b^2)^(1/2)))/a/d/e/n/(x^n)/(-a^2+b^2)^(1/2)+b
*(e*x)^(2*n)*ln(1+a*exp(c+d*x^n)/(b+(-a^2+b^2)^(1/2)))/a/d/e/n/(x^n)/(-a^2+b^2)^(1/2)-b*(e*x)^(2*n)*polylog(2,
-a*exp(c+d*x^n)/(b-(-a^2+b^2)^(1/2)))/a/d^2/e/n/(x^(2*n))/(-a^2+b^2)^(1/2)+b*(e*x)^(2*n)*polylog(2,-a*exp(c+d*
x^n)/(b+(-a^2+b^2)^(1/2)))/a/d^2/e/n/(x^(2*n))/(-a^2+b^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.40, antiderivative size = 307, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 8, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5548, 5544, 4276, 3401, 2296, 2221, 2317, 2438} \begin {gather*} -\frac {b x^{-2 n} (e x)^{2 n} \text {Li}_2\left (-\frac {a e^{d x^n+c}}{b-\sqrt {b^2-a^2}}\right )}{a d^2 e n \sqrt {b^2-a^2}}+\frac {b x^{-2 n} (e x)^{2 n} \text {Li}_2\left (-\frac {a e^{d x^n+c}}{b+\sqrt {b^2-a^2}}\right )}{a d^2 e n \sqrt {b^2-a^2}}-\frac {b x^{-n} (e x)^{2 n} \log \left (\frac {a e^{c+d x^n}}{b-\sqrt {b^2-a^2}}+1\right )}{a d e n \sqrt {b^2-a^2}}+\frac {b x^{-n} (e x)^{2 n} \log \left (\frac {a e^{c+d x^n}}{\sqrt {b^2-a^2}+b}+1\right )}{a d e n \sqrt {b^2-a^2}}+\frac {(e x)^{2 n}}{2 a e n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(e*x)^(-1 + 2*n)/(a + b*Sech[c + d*x^n]),x]

[Out]

(e*x)^(2*n)/(2*a*e*n) - (b*(e*x)^(2*n)*Log[1 + (a*E^(c + d*x^n))/(b - Sqrt[-a^2 + b^2])])/(a*Sqrt[-a^2 + b^2]*
d*e*n*x^n) + (b*(e*x)^(2*n)*Log[1 + (a*E^(c + d*x^n))/(b + Sqrt[-a^2 + b^2])])/(a*Sqrt[-a^2 + b^2]*d*e*n*x^n)
- (b*(e*x)^(2*n)*PolyLog[2, -((a*E^(c + d*x^n))/(b - Sqrt[-a^2 + b^2]))])/(a*Sqrt[-a^2 + b^2]*d^2*e*n*x^(2*n))
 + (b*(e*x)^(2*n)*PolyLog[2, -((a*E^(c + d*x^n))/(b + Sqrt[-a^2 + b^2]))])/(a*Sqrt[-a^2 + b^2]*d^2*e*n*x^(2*n)
)

Rule 2221

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x]
 - Dist[d*(m/(b*f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2296

Int[((F_)^(u_)*((f_.) + (g_.)*(x_))^(m_.))/((a_.) + (b_.)*(F_)^(u_) + (c_.)*(F_)^(v_)), x_Symbol] :> With[{q =
 Rt[b^2 - 4*a*c, 2]}, Dist[2*(c/q), Int[(f + g*x)^m*(F^u/(b - q + 2*c*F^u)), x], x] - Dist[2*(c/q), Int[(f + g
*x)^m*(F^u/(b + q + 2*c*F^u)), x], x]] /; FreeQ[{F, a, b, c, f, g}, x] && EqQ[v, 2*u] && LinearQ[u, x] && NeQ[
b^2 - 4*a*c, 0] && IGtQ[m, 0]

Rule 2317

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 3401

Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*sin[(e_.) + Pi*(k_.) + (Complex[0, fz_])*(f_.)*(x_)]), x_Symbol]
:> Dist[2, Int[((c + d*x)^m*(E^((-I)*e + f*fz*x)/(b + (2*a*E^((-I)*e + f*fz*x))/E^(I*Pi*(k - 1/2)) - (b*E^(2*(
(-I)*e + f*fz*x)))/E^(2*I*k*Pi))))/E^(I*Pi*(k - 1/2)), x], x] /; FreeQ[{a, b, c, d, e, f, fz}, x] && IntegerQ[
2*k] && NeQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rule 4276

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, 1/(Sin[e + f*x]^n/(b + a*Sin[e + f*x])^n), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && ILtQ[n, 0] &
& IGtQ[m, 0]

Rule 5544

Int[(x_)^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simpli
fy[(m + 1)/n] - 1)*(a + b*Sech[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplif
y[(m + 1)/n], 0] && IntegerQ[p]

Rule 5548

Int[((e_)*(x_))^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[e^IntPart[m]*((e*
x)^FracPart[m]/x^FracPart[m]), Int[x^m*(a + b*Sech[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]

Rubi steps

\begin {align*} \int \frac {(e x)^{-1+2 n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx &=\frac {\left (x^{-2 n} (e x)^{2 n}\right ) \int \frac {x^{-1+2 n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx}{e}\\ &=\frac {\left (x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \frac {x}{a+b \text {sech}(c+d x)} \, dx,x,x^n\right )}{e n}\\ &=\frac {\left (x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \left (\frac {x}{a}-\frac {b x}{a (b+a \cosh (c+d x))}\right ) \, dx,x,x^n\right )}{e n}\\ &=\frac {(e x)^{2 n}}{2 a e n}-\frac {\left (b x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \frac {x}{b+a \cosh (c+d x)} \, dx,x,x^n\right )}{a e n}\\ &=\frac {(e x)^{2 n}}{2 a e n}-\frac {\left (2 b x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \frac {e^{c+d x} x}{a+2 b e^{c+d x}+a e^{2 (c+d x)}} \, dx,x,x^n\right )}{a e n}\\ &=\frac {(e x)^{2 n}}{2 a e n}-\frac {\left (2 b x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \frac {e^{c+d x} x}{2 b-2 \sqrt {-a^2+b^2}+2 a e^{c+d x}} \, dx,x,x^n\right )}{\sqrt {-a^2+b^2} e n}+\frac {\left (2 b x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \frac {e^{c+d x} x}{2 b+2 \sqrt {-a^2+b^2}+2 a e^{c+d x}} \, dx,x,x^n\right )}{\sqrt {-a^2+b^2} e n}\\ &=\frac {(e x)^{2 n}}{2 a e n}-\frac {b x^{-n} (e x)^{2 n} \log \left (1+\frac {a e^{c+d x^n}}{b-\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} d e n}+\frac {b x^{-n} (e x)^{2 n} \log \left (1+\frac {a e^{c+d x^n}}{b+\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} d e n}+\frac {\left (b x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \log \left (1+\frac {2 a e^{c+d x}}{2 b-2 \sqrt {-a^2+b^2}}\right ) \, dx,x,x^n\right )}{a \sqrt {-a^2+b^2} d e n}-\frac {\left (b x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \log \left (1+\frac {2 a e^{c+d x}}{2 b+2 \sqrt {-a^2+b^2}}\right ) \, dx,x,x^n\right )}{a \sqrt {-a^2+b^2} d e n}\\ &=\frac {(e x)^{2 n}}{2 a e n}-\frac {b x^{-n} (e x)^{2 n} \log \left (1+\frac {a e^{c+d x^n}}{b-\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} d e n}+\frac {b x^{-n} (e x)^{2 n} \log \left (1+\frac {a e^{c+d x^n}}{b+\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} d e n}+\frac {\left (b x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {2 a x}{2 b-2 \sqrt {-a^2+b^2}}\right )}{x} \, dx,x,e^{c+d x^n}\right )}{a \sqrt {-a^2+b^2} d^2 e n}-\frac {\left (b x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {2 a x}{2 b+2 \sqrt {-a^2+b^2}}\right )}{x} \, dx,x,e^{c+d x^n}\right )}{a \sqrt {-a^2+b^2} d^2 e n}\\ &=\frac {(e x)^{2 n}}{2 a e n}-\frac {b x^{-n} (e x)^{2 n} \log \left (1+\frac {a e^{c+d x^n}}{b-\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} d e n}+\frac {b x^{-n} (e x)^{2 n} \log \left (1+\frac {a e^{c+d x^n}}{b+\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} d e n}-\frac {b x^{-2 n} (e x)^{2 n} \text {Li}_2\left (-\frac {a e^{c+d x^n}}{b-\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} d^2 e n}+\frac {b x^{-2 n} (e x)^{2 n} \text {Li}_2\left (-\frac {a e^{c+d x^n}}{b+\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} d^2 e n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 1.48, size = 859, normalized size = 2.80 \begin {gather*} \frac {(e x)^{2 n} \left (b+a \cosh \left (c+d x^n\right )\right ) \left (1+\frac {2 b x^{-2 n} \left (2 \left (c+d x^n\right ) \text {ArcTan}\left (\frac {(a+b) \coth \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )+2 \left (c-i \text {ArcCos}\left (-\frac {b}{a}\right )\right ) \text {ArcTan}\left (\frac {(a-b) \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )+\left (\text {ArcCos}\left (-\frac {b}{a}\right )+2 \left (\text {ArcTan}\left (\frac {(a+b) \coth \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )+\text {ArcTan}\left (\frac {(a-b) \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )\right )\right ) \log \left (\frac {\sqrt {a^2-b^2} e^{-\frac {c}{2}-\frac {d x^n}{2}}}{\sqrt {2} \sqrt {a} \sqrt {b+a \cosh \left (c+d x^n\right )}}\right )+\left (\text {ArcCos}\left (-\frac {b}{a}\right )-2 \left (\text {ArcTan}\left (\frac {(a+b) \coth \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )+\text {ArcTan}\left (\frac {(a-b) \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )\right )\right ) \log \left (\frac {\sqrt {a^2-b^2} e^{\frac {1}{2} \left (c+d x^n\right )}}{\sqrt {2} \sqrt {a} \sqrt {b+a \cosh \left (c+d x^n\right )}}\right )-\left (\text {ArcCos}\left (-\frac {b}{a}\right )+2 \text {ArcTan}\left (\frac {(a-b) \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )\right ) \log \left (\frac {(a+b) \left (-a+b+i \sqrt {a^2-b^2}\right ) \left (-1+\tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{a \left (a+b+i \sqrt {a^2-b^2} \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}\right )-\left (\text {ArcCos}\left (-\frac {b}{a}\right )-2 \text {ArcTan}\left (\frac {(a-b) \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )\right ) \log \left (\frac {(a+b) \left (a-b+i \sqrt {a^2-b^2}\right ) \left (1+\tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{a \left (a+b+i \sqrt {a^2-b^2} \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}\right )+i \left (\text {PolyLog}\left (2,\frac {\left (b-i \sqrt {a^2-b^2}\right ) \left (a+b-i \sqrt {a^2-b^2} \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{a \left (a+b+i \sqrt {a^2-b^2} \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}\right )-\text {PolyLog}\left (2,\frac {\left (b+i \sqrt {a^2-b^2}\right ) \left (a+b-i \sqrt {a^2-b^2} \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{a \left (a+b+i \sqrt {a^2-b^2} \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}\right )\right )\right )}{\sqrt {a^2-b^2} d^2}\right ) \text {sech}\left (c+d x^n\right )}{2 a e n \left (a+b \text {sech}\left (c+d x^n\right )\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(e*x)^(-1 + 2*n)/(a + b*Sech[c + d*x^n]),x]

[Out]

((e*x)^(2*n)*(b + a*Cosh[c + d*x^n])*(1 + (2*b*(2*(c + d*x^n)*ArcTan[((a + b)*Coth[(c + d*x^n)/2])/Sqrt[a^2 -
b^2]] + 2*(c - I*ArcCos[-(b/a)])*ArcTan[((a - b)*Tanh[(c + d*x^n)/2])/Sqrt[a^2 - b^2]] + (ArcCos[-(b/a)] + 2*(
ArcTan[((a + b)*Coth[(c + d*x^n)/2])/Sqrt[a^2 - b^2]] + ArcTan[((a - b)*Tanh[(c + d*x^n)/2])/Sqrt[a^2 - b^2]])
)*Log[(Sqrt[a^2 - b^2]*E^(-1/2*c - (d*x^n)/2))/(Sqrt[2]*Sqrt[a]*Sqrt[b + a*Cosh[c + d*x^n]])] + (ArcCos[-(b/a)
] - 2*(ArcTan[((a + b)*Coth[(c + d*x^n)/2])/Sqrt[a^2 - b^2]] + ArcTan[((a - b)*Tanh[(c + d*x^n)/2])/Sqrt[a^2 -
 b^2]]))*Log[(Sqrt[a^2 - b^2]*E^((c + d*x^n)/2))/(Sqrt[2]*Sqrt[a]*Sqrt[b + a*Cosh[c + d*x^n]])] - (ArcCos[-(b/
a)] + 2*ArcTan[((a - b)*Tanh[(c + d*x^n)/2])/Sqrt[a^2 - b^2]])*Log[((a + b)*(-a + b + I*Sqrt[a^2 - b^2])*(-1 +
 Tanh[(c + d*x^n)/2]))/(a*(a + b + I*Sqrt[a^2 - b^2]*Tanh[(c + d*x^n)/2]))] - (ArcCos[-(b/a)] - 2*ArcTan[((a -
 b)*Tanh[(c + d*x^n)/2])/Sqrt[a^2 - b^2]])*Log[((a + b)*(a - b + I*Sqrt[a^2 - b^2])*(1 + Tanh[(c + d*x^n)/2]))
/(a*(a + b + I*Sqrt[a^2 - b^2]*Tanh[(c + d*x^n)/2]))] + I*(PolyLog[2, ((b - I*Sqrt[a^2 - b^2])*(a + b - I*Sqrt
[a^2 - b^2]*Tanh[(c + d*x^n)/2]))/(a*(a + b + I*Sqrt[a^2 - b^2]*Tanh[(c + d*x^n)/2]))] - PolyLog[2, ((b + I*Sq
rt[a^2 - b^2])*(a + b - I*Sqrt[a^2 - b^2]*Tanh[(c + d*x^n)/2]))/(a*(a + b + I*Sqrt[a^2 - b^2]*Tanh[(c + d*x^n)
/2]))])))/(Sqrt[a^2 - b^2]*d^2*x^(2*n)))*Sech[c + d*x^n])/(2*a*e*n*(a + b*Sech[c + d*x^n]))

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 2.99, size = 587, normalized size = 1.91

method result size
risch \(\frac {x \,{\mathrm e}^{\frac {\left (-1+2 n \right ) \left (-i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )+i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}+i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}-i \pi \mathrm {csgn}\left (i e x \right )^{3}+2 \ln \left (x \right )+2 \ln \left (e \right )\right )}{2}}}{2 a n}-\frac {2 b \,{\mathrm e}^{-i \pi n \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )} {\mathrm e}^{i \pi n \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}} {\mathrm e}^{i \pi n \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}} {\mathrm e}^{-i \pi n \mathrm {csgn}\left (i e x \right )^{3}} {\mathrm e}^{\frac {i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )}{2}} {\mathrm e}^{-\frac {i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}}{2}} {\mathrm e}^{-\frac {i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}}{2}} {\mathrm e}^{\frac {i \pi \mathrm {csgn}\left (i e x \right )^{3}}{2}} e^{2 n} {\mathrm e}^{c} \left (\frac {x^{n} d \left (\ln \left (-\frac {a \,{\mathrm e}^{2 c +d \,x^{n}}+{\mathrm e}^{c} b -\sqrt {b^{2} {\mathrm e}^{2 c}-a^{2} {\mathrm e}^{2 c}}}{-{\mathrm e}^{c} b +\sqrt {b^{2} {\mathrm e}^{2 c}-a^{2} {\mathrm e}^{2 c}}}\right )-\ln \left (\frac {a \,{\mathrm e}^{2 c +d \,x^{n}}+{\mathrm e}^{c} b +\sqrt {b^{2} {\mathrm e}^{2 c}-a^{2} {\mathrm e}^{2 c}}}{{\mathrm e}^{c} b +\sqrt {b^{2} {\mathrm e}^{2 c}-a^{2} {\mathrm e}^{2 c}}}\right )\right )}{2 \sqrt {b^{2} {\mathrm e}^{2 c}-a^{2} {\mathrm e}^{2 c}}}+\frac {\dilog \left (-\frac {a \,{\mathrm e}^{2 c +d \,x^{n}}+{\mathrm e}^{c} b -\sqrt {b^{2} {\mathrm e}^{2 c}-a^{2} {\mathrm e}^{2 c}}}{-{\mathrm e}^{c} b +\sqrt {b^{2} {\mathrm e}^{2 c}-a^{2} {\mathrm e}^{2 c}}}\right )-\dilog \left (\frac {a \,{\mathrm e}^{2 c +d \,x^{n}}+{\mathrm e}^{c} b +\sqrt {b^{2} {\mathrm e}^{2 c}-a^{2} {\mathrm e}^{2 c}}}{{\mathrm e}^{c} b +\sqrt {b^{2} {\mathrm e}^{2 c}-a^{2} {\mathrm e}^{2 c}}}\right )}{2 \sqrt {b^{2} {\mathrm e}^{2 c}-a^{2} {\mathrm e}^{2 c}}}\right )}{a e n \,d^{2}}\) \(587\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^(-1+2*n)/(a+b*sech(c+d*x^n)),x,method=_RETURNVERBOSE)

[Out]

1/2/a/n*x*exp(1/2*(-1+2*n)*(-I*Pi*csgn(I*e)*csgn(I*x)*csgn(I*e*x)+I*Pi*csgn(I*e)*csgn(I*e*x)^2+I*Pi*csgn(I*x)*
csgn(I*e*x)^2-I*Pi*csgn(I*e*x)^3+2*ln(x)+2*ln(e)))-2/a*b*exp(-I*Pi*n*csgn(I*e)*csgn(I*x)*csgn(I*e*x))*exp(I*Pi
*n*csgn(I*e)*csgn(I*e*x)^2)*exp(I*Pi*n*csgn(I*x)*csgn(I*e*x)^2)*exp(-I*Pi*n*csgn(I*e*x)^3)*exp(1/2*I*Pi*csgn(I
*e)*csgn(I*x)*csgn(I*e*x))*exp(-1/2*I*Pi*csgn(I*e)*csgn(I*e*x)^2)*exp(-1/2*I*Pi*csgn(I*x)*csgn(I*e*x)^2)*exp(1
/2*I*Pi*csgn(I*e*x)^3)*(e^n)^2/e*exp(c)/n/d^2*(1/2*x^n*d*(ln(-(a*exp(2*c+d*x^n)+exp(c)*b-(b^2*exp(2*c)-a^2*exp
(2*c))^(1/2))/(-exp(c)*b+(b^2*exp(2*c)-a^2*exp(2*c))^(1/2)))-ln((a*exp(2*c+d*x^n)+exp(c)*b+(b^2*exp(2*c)-a^2*e
xp(2*c))^(1/2))/(exp(c)*b+(b^2*exp(2*c)-a^2*exp(2*c))^(1/2))))/(b^2*exp(2*c)-a^2*exp(2*c))^(1/2)+1/2*(dilog(-(
a*exp(2*c+d*x^n)+exp(c)*b-(b^2*exp(2*c)-a^2*exp(2*c))^(1/2))/(-exp(c)*b+(b^2*exp(2*c)-a^2*exp(2*c))^(1/2)))-di
log((a*exp(2*c+d*x^n)+exp(c)*b+(b^2*exp(2*c)-a^2*exp(2*c))^(1/2))/(exp(c)*b+(b^2*exp(2*c)-a^2*exp(2*c))^(1/2))
))/(b^2*exp(2*c)-a^2*exp(2*c))^(1/2))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+2*n)/(a+b*sech(c+d*x^n)),x, algorithm="maxima")

[Out]

-2*b*integrate(e^(d*x^n + 2*n*log(x) + c + 2*n)/(a^2*x*e + a^2*x*e^(2*d*x^n + 2*c + 1) + 2*a*b*x*e^(d*x^n + c
+ 1)), x) + 1/2*e^(2*n*log(x) + 2*n - 1)/(a*n)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1050 vs. \(2 (287) = 574\).
time = 0.39, size = 1050, normalized size = 3.42 \begin {gather*} \frac {{\left ({\left (a^{2} - b^{2}\right )} d^{2} \cosh \left (2 \, n - 1\right ) + {\left (a^{2} - b^{2}\right )} d^{2} \sinh \left (2 \, n - 1\right )\right )} \cosh \left (n \log \left (x\right )\right )^{2} + 2 \, {\left ({\left (a^{2} - b^{2}\right )} d^{2} \cosh \left (2 \, n - 1\right ) + {\left (a^{2} - b^{2}\right )} d^{2} \sinh \left (2 \, n - 1\right )\right )} \cosh \left (n \log \left (x\right )\right ) \sinh \left (n \log \left (x\right )\right ) + {\left ({\left (a^{2} - b^{2}\right )} d^{2} \cosh \left (2 \, n - 1\right ) + {\left (a^{2} - b^{2}\right )} d^{2} \sinh \left (2 \, n - 1\right )\right )} \sinh \left (n \log \left (x\right )\right )^{2} + 2 \, {\left (a b \cosh \left (2 \, n - 1\right ) + a b \sinh \left (2 \, n - 1\right )\right )} \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} {\rm Li}_2\left (-\frac {{\left (a \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} + b\right )} \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + {\left (a \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} + b\right )} \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + a}{a} + 1\right ) - 2 \, {\left (a b \cosh \left (2 \, n - 1\right ) + a b \sinh \left (2 \, n - 1\right )\right )} \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} {\rm Li}_2\left (\frac {{\left (a \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} - b\right )} \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + {\left (a \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} - b\right )} \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) - a}{a} + 1\right ) + 2 \, {\left (a b c \cosh \left (2 \, n - 1\right ) + a b c \sinh \left (2 \, n - 1\right )\right )} \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} \log \left (2 \, a \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + 2 \, a \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + 2 \, a \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} + 2 \, b\right ) - 2 \, {\left (a b c \cosh \left (2 \, n - 1\right ) + a b c \sinh \left (2 \, n - 1\right )\right )} \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} \log \left (2 \, a \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + 2 \, a \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) - 2 \, a \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} + 2 \, b\right ) + 2 \, {\left ({\left (a b d \cosh \left (2 \, n - 1\right ) + a b d \sinh \left (2 \, n - 1\right )\right )} \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} \cosh \left (n \log \left (x\right )\right ) + {\left (a b d \cosh \left (2 \, n - 1\right ) + a b d \sinh \left (2 \, n - 1\right )\right )} \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} \sinh \left (n \log \left (x\right )\right ) + {\left (a b c \cosh \left (2 \, n - 1\right ) + a b c \sinh \left (2 \, n - 1\right )\right )} \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}}\right )} \log \left (\frac {{\left (a \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} + b\right )} \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + {\left (a \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} + b\right )} \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + a}{a}\right ) - 2 \, {\left ({\left (a b d \cosh \left (2 \, n - 1\right ) + a b d \sinh \left (2 \, n - 1\right )\right )} \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} \cosh \left (n \log \left (x\right )\right ) + {\left (a b d \cosh \left (2 \, n - 1\right ) + a b d \sinh \left (2 \, n - 1\right )\right )} \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} \sinh \left (n \log \left (x\right )\right ) + {\left (a b c \cosh \left (2 \, n - 1\right ) + a b c \sinh \left (2 \, n - 1\right )\right )} \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}}\right )} \log \left (-\frac {{\left (a \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} - b\right )} \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + {\left (a \sqrt {-\frac {a^{2} - b^{2}}{a^{2}}} - b\right )} \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) - a}{a}\right )}{2 \, {\left (a^{3} - a b^{2}\right )} d^{2} n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+2*n)/(a+b*sech(c+d*x^n)),x, algorithm="fricas")

[Out]

1/2*(((a^2 - b^2)*d^2*cosh(2*n - 1) + (a^2 - b^2)*d^2*sinh(2*n - 1))*cosh(n*log(x))^2 + 2*((a^2 - b^2)*d^2*cos
h(2*n - 1) + (a^2 - b^2)*d^2*sinh(2*n - 1))*cosh(n*log(x))*sinh(n*log(x)) + ((a^2 - b^2)*d^2*cosh(2*n - 1) + (
a^2 - b^2)*d^2*sinh(2*n - 1))*sinh(n*log(x))^2 + 2*(a*b*cosh(2*n - 1) + a*b*sinh(2*n - 1))*sqrt(-(a^2 - b^2)/a
^2)*dilog(-((a*sqrt(-(a^2 - b^2)/a^2) + b)*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + (a*sqrt(-(a^2 - b^2
)/a^2) + b)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + a)/a + 1) - 2*(a*b*cosh(2*n - 1) + a*b*sinh(2*n -
1))*sqrt(-(a^2 - b^2)/a^2)*dilog(((a*sqrt(-(a^2 - b^2)/a^2) - b)*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)
 + (a*sqrt(-(a^2 - b^2)/a^2) - b)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) - a)/a + 1) + 2*(a*b*c*cosh(2*
n - 1) + a*b*c*sinh(2*n - 1))*sqrt(-(a^2 - b^2)/a^2)*log(2*a*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + 2
*a*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + 2*a*sqrt(-(a^2 - b^2)/a^2) + 2*b) - 2*(a*b*c*cosh(2*n - 1)
+ a*b*c*sinh(2*n - 1))*sqrt(-(a^2 - b^2)/a^2)*log(2*a*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + 2*a*sinh
(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) - 2*a*sqrt(-(a^2 - b^2)/a^2) + 2*b) + 2*((a*b*d*cosh(2*n - 1) + a*b*
d*sinh(2*n - 1))*sqrt(-(a^2 - b^2)/a^2)*cosh(n*log(x)) + (a*b*d*cosh(2*n - 1) + a*b*d*sinh(2*n - 1))*sqrt(-(a^
2 - b^2)/a^2)*sinh(n*log(x)) + (a*b*c*cosh(2*n - 1) + a*b*c*sinh(2*n - 1))*sqrt(-(a^2 - b^2)/a^2))*log(((a*sqr
t(-(a^2 - b^2)/a^2) + b)*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + (a*sqrt(-(a^2 - b^2)/a^2) + b)*sinh(d
*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + a)/a) - 2*((a*b*d*cosh(2*n - 1) + a*b*d*sinh(2*n - 1))*sqrt(-(a^2 -
b^2)/a^2)*cosh(n*log(x)) + (a*b*d*cosh(2*n - 1) + a*b*d*sinh(2*n - 1))*sqrt(-(a^2 - b^2)/a^2)*sinh(n*log(x)) +
 (a*b*c*cosh(2*n - 1) + a*b*c*sinh(2*n - 1))*sqrt(-(a^2 - b^2)/a^2))*log(-((a*sqrt(-(a^2 - b^2)/a^2) - b)*cosh
(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + (a*sqrt(-(a^2 - b^2)/a^2) - b)*sinh(d*cosh(n*log(x)) + d*sinh(n*lo
g(x)) + c) - a)/a))/((a^3 - a*b^2)*d^2*n)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (e x\right )^{2 n - 1}}{a + b \operatorname {sech}{\left (c + d x^{n} \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)**(-1+2*n)/(a+b*sech(c+d*x**n)),x)

[Out]

Integral((e*x)**(2*n - 1)/(a + b*sech(c + d*x**n)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+2*n)/(a+b*sech(c+d*x^n)),x, algorithm="giac")

[Out]

integrate((e*x)^(2*n - 1)/(b*sech(d*x^n + c) + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (e\,x\right )}^{2\,n-1}}{a+\frac {b}{\mathrm {cosh}\left (c+d\,x^n\right )}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^(2*n - 1)/(a + b/cosh(c + d*x^n)),x)

[Out]

int((e*x)^(2*n - 1)/(a + b/cosh(c + d*x^n)), x)

________________________________________________________________________________________